import network from '@/utils/network'
import baseUrl from './baseUrl'
const BASE_URL = baseUrl + '/Customer'

export default {
  getPageList(data) {
    return network.request({
      url: BASE_URL + '/GetPageList',
      method: 'post',
      data
    })
  },
  getDetail(id) {
    return network.request({
      url: BASE_URL + '/GetDetail',
      method: 'get',
      params: {
        id
      }
    })
  },
  getOldIcpDetail(id) {
    return network.request({
      url: BASE_URL + '/GetOldIcpDetail',
      method: 'get',
      params: {
        id
      }
    })
  },
  syncCustomersToEs(data) {
    return network.request({
      url: BASE_URL + '/SyncCustomersToEs',
      method: 'post',
      data
    })
  },
  syncCustomerExamineToEs(customerExamineId) {
    return network.request({
      url: BASE_URL + '/SyncCustomerExamineToEs',
      method: 'get',
      params:{
        customerExamineId
      }
    })
  },
  syncCustomersToIcp(data) {
    return network.request({
      url: BASE_URL + '/SyncCustomersToIcp',
      method: 'post',
      data
    })
  },
  resetNameUniqueValue(data) {
    return network.request({
      url: BASE_URL + '/ResetNameUniqueValue',
      method: 'post',
      data
    })
  },
  getExamineStatusExceptionList(data) {
    return network.request({
      url: BASE_URL + '/GetExamineStatusExceptionList',
      method: 'post',
      data
    })
  },
  repairExamineStatus(data) {
    return network.request({
      url: BASE_URL + '/RepairExamineStatus',
      method: 'post',
      data
    })
  },
  getNameUniqueValueRepeatList(data) {
    return network.request({
      url: BASE_URL + '/GetNameUniqueValueRepeatList',
      method: 'post',
      data
    })
  },
  getNameLocalizationUniqueValueRepeatList(data) {
    return network.request({
      url: BASE_URL + '/GetNameLocalizationUniqueValueRepeatList',
      method: 'post',
      data
    })
  },
  decodeCustomerLocalizationText(data) {
    return network.request({
      url: BASE_URL + '/DecodeCustomerLocalizationText',
      method: 'post',
      data
    })
  },
  //合并客户
  mergeCustomersExportExcel(data) {
    return network.download({
      url: BASE_URL + '/MergeCustomersExportExcel',
      method: 'post',
      data,
      autoDownload:true
    })
  },
}